package com.biz.primus.ms.sms.dao.repository;

import com.biz.primus.ms.sms.dao.po.SelectedProvider;
import com.google.common.base.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author yanweijin
 * @date 2017/5/31
 */
public interface SelectedProviderRepository extends JpaRepository<SelectedProvider,Long> {

	Optional<SelectedProvider> findFirstByOrderByIdDesc();

	@Transactional
	SelectedProvider save(SelectedProvider selectedProvider);

	List<SelectedProvider> findAll();

}
